package registrazioneServer;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.Vector;

import manager.MyState;
import objects.Player;

public class ServerConnectImp extends UnicastRemoteObject implements ServerConnectInterface {
	
	private static final long serialVersionUID = 1L;

	MyState my = MyState.getInstance();
	
	
	String myname;
	
	
	
	public ServerConnectImp(String name ) throws RemoteException {
		myname = name;
	}

	
	public void notifica(Vector<Player> lista) {
		my.setListPlayer(lista);
		
		
	}
	
	public String name()throws RemoteException{
		
		return my.getname();
	}

	
	
}
